package org.springblade.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDate;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 保养计划配置实体类
 *
 * @author ysq
 * @since 2022-03-09
 */
@Data
@TableName("blade_maintain_plan_config")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MaintainPlanConfig对象", description = "保养计划配置")
public class MaintainPlanConfig extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 小区id
	*/
	@ApiModelProperty(value = "小区id")
	private Long buildingId;
	/**
	* 服务开始时间
	*/
	@ApiModelProperty(value = "服务开始时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date startTime;
	/**
	* 服务结束时间
	*/
	@ApiModelProperty(value = "服务结束时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date endTime;
	/**
	* 电梯id
	*/
	@ApiModelProperty(value = "电梯id")
	private Long elevatorId;
	/**
	* 保养计划id
	*/
	@ApiModelProperty(value = "任务计划id")
	private Long taskPlanId;
	/**
	* 保养状态 : 对应枚举 ElevatorMaintainStatusEnums
	*/
	private Integer maintainStatus;
	/**
	* 首次保养时间
	*/
	@ApiModelProperty(value = "首次保养时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date firstTime;
	/**
	* 部门id集合
	*/
	@ApiModelProperty(value = "部门id集合")
	private String deptIds;
	/**
	* 部门名称集合
	*/
	@ApiModelProperty(value = "部门名称集合")
	private String deptNames;
	/**
	* 用户id集合
	*/
	@ApiModelProperty(value = "用户id集合")
	private String userIds;
	/**
	* 用户名称集合
	*/
	@ApiModelProperty(value = "用户名称集合")
	private String userNames;

	@ApiModelProperty(value = "合同id")
	private Long contractId;


	@ApiModelProperty("合同来源 1:外包合同2:非外包合同,-1:无状态默认值")
	private Integer  fromType;

	@ApiModelProperty("合同来源 1:外包合同2:非外包合同")
	private Long  fromTypeContractId;


	@ApiModelProperty("是否质保合同0:否，1是,-1表示无状态")
	@TableField(exist = false)
	private Integer isQuaGuarantee;

	@ApiModelProperty("电梯是否存在问题1:存在0:不存在")
	@TableField(exist = false)
	private Integer isQuestion;

	@ApiModelProperty("该电梯是否存在存档1:存在0:不存在")
	@TableField(exist = false)
	private Integer isGap;


	@TableField(exist = false)
	@ApiModelProperty("1:非年审，2:年审")
	private Integer auditType;


	@TableField(exist = false)
	@ApiModelProperty("电梯名称")
	private String elevatorAddress;


	@TableField(exist = false)
	@ApiModelProperty("项目名称")
	private String buildingName;

	@TableField(exist = false)
	@ApiModelProperty("客户使用单位id")
	private Long buildingUserId;

	@ApiModelProperty("距离到期多少天")
	@TableField(exist = false)
	private Integer aboutEndDay;
}
